﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Security;
using System.Text;
using System.Threading.Tasks;
using Microsoft.VisualBasic;

namespace Marmat.Forms.Views.DataGrid
{
    public partial class SaveProject
    {
        /// <summary>
        /// 获取或设置保存方案对应的数据表名。
        /// </summary>
        [DefaultValue(null)]
        [Category("数据")]
        [Description("获取或设置保存方案对应的数据表名。")]
        public string TableName { get; set; }

        /// <summary>
        /// 获取或设置充当数据表主键的列的数组。
        /// </summary>
        [Browsable(false)]
        [DefaultValue(null)]
        [Category("数据")]
        [Description("获取或设置充当数据表主键的列的数组。")]
        [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
        public List<SaveProjectColumn> PrimaryKey
        {
            get
            {
                if (this._PrimaryKey == null)
                    this._PrimaryKey = new List<SaveProjectColumn>();
                return this._PrimaryKey;
            }
        }
        private List<SaveProjectColumn> _PrimaryKey;

        private List<SaveProjectColumn> m_Columns;


        /// <summary>
        /// 获取或设置充当数据表存储列的数组。
        /// </summary>
        [Browsable(false)]
        [Category("数据")]
        [Description("获取或设置充当数据表存储列的数组。")]
        [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
        public List<SaveProjectColumn> Columns
        {
            get
            {
                if (this.m_Columns == null)
                    this.m_Columns = new List<SaveProjectColumn>();
                return this.m_Columns;
            }
        }

        /// <summary>
        /// 返回表示当前对象的字符串。
        /// </summary>
        /// <returns></returns>
        public override string ToString()
        {
            return string.IsNullOrEmpty(this.TableName) ? base.ToString() : this.TableName;
        }
    }
}
